/** When your routing table is too long, you can split it into small modules **/

import { RouteConfig } from 'vue-router'
import Layout from '@/Layout/index.vue'

const contractRouter: RouteConfig = {
  path: '/contractManage',
  component: Layout,
  redirect: '/contractManage/contractMag',
  name: '合同管理',
  meta: {
    title: '合同管理',
    icon: 'form',
    hidden: true
  },
  children: [
    // 合同管理
    {
      path: 'contractMag',
      name: '合同管理',
      meta: { title: '合同管理' }
    },
    {
      path: 'contractMag/insert',
      name: '新增合同',
      meta: { title: '新增合同', hidden: true }
    },
    {
      path: 'contractMag/edit',
      name: '编辑合同',
      meta: { title: '编辑合同', hidden: true }
    },
    {
      path: 'contractMag/detail/:id',
      name: '/contractManage/contractMag/detail',
      meta: { title: '合同详情', hidden: true }
    },
    // 合同关联
    {
      path: 'contractCorrelation',
      name: '合同关联',
      meta: { title: '合同关联' }
    },
    {
      path: 'contractCorrelation/insert',
      name: '新增关联',
      meta: { title: '新增关联', hidden: true }
    },
    {
      path: 'contractCorrelation/edit/:type/:id',
      name: '/contractManage/contractCorrelation/edit',
      meta: { title: '编辑关联', hidden: true }
    },
    {
      path: 'contractCorrelation/detail/:id/:type',
      name: '关联详情',
      meta: { title: '关联详情', hidden: true }
    },
    {
      path: 'attachmentConfig',
      name: '附件配置',
      meta: { title: '附件配置' }
    },
    {
      path: 'contractAnalyze',
      name: '合同分析',
      meta: { title: '合同分析' }
    },
    {
      path: 'commodity',
      name: '商品分析',
      meta: { title: '商品分析' }
    }
  ]
}
export default contractRouter
